package com.github.why168;

import java.util.ArrayDeque;
import java.util.HashMap;
import java.util.Map;

/**
 * @author Edwin.Wu edwin.wu05@gmail.com
 * @version 2019-06-28 19:08
 * @since JDK1.8
 */
public class Main {

    public static void main(String[] args) {
        ArrayDeque<Integer> queue = new ArrayDeque<>();

        for (int i = 0; i < 10; i++) {
            queue.offer(i);
        }

        int size = queue.size();
        for (int i = 0; i < size; i++) {
            System.out.println(queue.remove(i + 5));
        }


        HashMap<String, String> map = new HashMap<>(1);
        for (int i = 0; i < 100; i++) {
            map.put(i + "", i + "");
        }
        map.get("");

        int cap = (int) Math.pow(2f, 11f);
//        int cap = 1025;
        int n = cap - 1;
        System.out.println("cap - 1:" + n);
        n |= n >>> 1;
        System.out.println("cap >>> 1:" + n);
        n |= n >>> 2;
        System.out.println("cap >>> 2:" + n);
        n |= n >>> 4;
        System.out.println("cap >>> 4:" + n);
        n |= n >>> 8;
        System.out.println("cap >>> 8:" + n);
        n |= n >>> 16;
        System.out.println("cap >>> 16:" + n);
    }

}
